<%@page import="com.lynn.salary.entity.User_"%>
<%@page import="com.opensymphony.xwork2.util.ValueStack"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF8"%>
<%
	String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'modifyInf.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<style type="text/css">
.lynn_title{
margin-top:15px;
margin-left:20px;
color:gray;
}
.lynn_table{
postion:relative;
margin-left:60px;
margin-right:60px;
margin-top:30px;
}
.lynn_table table{
border-style:solid;
border-color:silver;
border-width: thin ;
position:relative;
z-index:0px;
}
.lynn_tt{
   font-family:sans-serif; 
   font-size:13px;
	background:lavender;
	line-height: 115%;
	width:500px;
	height: 25px;
	text-align:left;
	font-family:sans-serif;
	font-weight : bold ;
	
}
.lynn_table td{
	border-bottom: 1px solid darkgray;
	text-align:center;
	background:azure;
	height:35px;
	font-size: 12px;
	border-top-style:solid;
	border-top-color: silver;
	border-top-width: 0px;
	border-right-style:solid;
	border-right-color: silver;
	border-right-width: 1px;
}
.lynn_file{
text-align:left;
padding-top:4px;
}
.lynn_yulan{
text-align:left;
}
.lynn_gender{
text-align:left;
}
.lynn_date{
position:relative;
z-index:-2px;
}
	</style>
<%
	String submitUrl = "";
	String inputValue = "";
	ValueStack vs = (ValueStack)request.getAttribute("struts.valueStack");
	User_ editEmpo = (User_)vs.findValue("employee");
	String flag = vs.findString("flag");
	if(flag!=null&&flag.equals("showEditSelf")) {
		submitUrl = basePath + "employee!edit.do?flag=updateSelf&employee.id="+editEmpo.getId();
	}
%>
  </head>
  
  <body>
   
   <div class="lynn_title">
    修改我的信息
   </div>
   <div class="pageContent">
	
	<form method="post" action="<%=submitUrl %>" class="pageForm required-validate" onsubmit="return validateCallback(this)">
		<div class="pageFormContent nowrap" layoutH="80">
		<div class="lynn_table">
		<table>
		<tr class="lynn_tt"><th class="lynn_tt">
		基本信息
		</th></tr>
		
		<tr>
		<td width=15%>姓名</td>
		<td width=35%>	<input name="employee.name" class="required" type="text" size="30"  value="<s:property value='employee.name' />" /></td>
		<td width=15%>照片</td>
		<td width=35%><div class="lynn_file"><input name="file1" type="file" /></div><div class="lynn_yulan"> <input type="button" value="预览"><input type="button" value="清除"></div></td>
		</tr>
		<tr>
		<td width=15%  height=75px;>员工编号</td>
		<td width=35%><input name="employee.id" type="text" size="30"  value="<s:property value='employee.id' />" readonly/></td>
	<td width=15%>出生日期</td>
		<td width=35%>
		
		<input type="text" name="employee.birthday" class="date" size="30" value="<s:property value='employee.birthday' />"/><a class="inputDateButton" href="javascript:;">选择</a>
		</td>
		</tr>
		<tr>
		<td width=15%>性别</td>
		<td width=35%><div class="lynn_gender">	<%   

				 	String man = editEmpo.getGender().equals("男")?"checked='checked'":"";
					String woman = editEmpo.getGender().equals("女")?"checked='checked'":"";
				%>
			<input type="radio" name="employee.gender" value="男" <%=man%>>男
            <input type="radio" name="employee.gender" value="女" <%=woman%>>女 </div>
</td>
		<td width=15%>部门</td>
		<td width=35%><s:select name="employee.departmentId" list="departments" listKey="code" listValue="name"></s:select></td>
		 </tr>
		  <tr>
		<td width=15%>民族</td>
		<td width=35%><s:select name="employee.nationality" list="nationalitys" listKey="code" listValue="name"></s:select></td>
		<td width=15%>岗位</td>
		<td width=35%><s:select name="employee.position" list="positions" listKey="code" listValue="name"></s:select></td>
		</tr>
		<tr>
		<td width=15%>职务</td>
		<td width=35%><s:select name="employee.post" list="posts" listKey="code" listValue="name"></s:select></td>
		<td width=15%>身份证号</td>
		<td width=35%><input name="employee.idCard" class="required" type="text" size="30" value="<s:property value='employee.idCard' />" /></td>
		</tr>
		<tr>
		<td width=15%>手机号码</td>
		<td width=35%><input name="employee.telephone" name="employee.telephone" class="phone" size="30" value="<s:property value='employee.telephone'/>"/></td>
		<td width=15%>入职日期</td>
		<td width=35%><input type="text" name="employee.entryDate" class="date" size="30" value="<s:property value='employee.entryDate' />"/><a class="inputDateButton" href="javascript:;">选择</a></td>
		</tr>
			<tr>
		<td width=15%>薪酬标准</td>
		<td width=35%>
		<s:select name="employee.salaryStandard" list="salarystandards" listKey="id" listValue="name"></s:select></td>
		<td width=15%>状态</td>
		<td width=35%><s:select list="#{'1':'在职','2':'离退'}"  listKey="key" listValue="value" name="employee.employeeState" value="employee.employeeState" ></s:select></td>
		</tr>
		</tr>
		</table>
		</div>
		</div>
   <div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
   </div>
  </body>
</html>
